//
//  TransferableFeed.swift
//  RssFly
//
//  Created by shen on 2023/10/17.
//

import SwiftUI
import UniformTypeIdentifiers

struct TransferableFeed: Codable, Transferable {
    var objectURI: URL
    var feedURL: URL

    static var transferRepresentation: some TransferRepresentation {
        CodableRepresentation(contentType: .denFeed)
        ProxyRepresentation(exporting: \.feedURL)
        ProxyRepresentation(exporting: \.feedURL.absoluteString)
    }
}

extension UTType {
    static var denFeed = UTType(exportedAs: "net.devsci.den.transferable.feed")
}
